FIND_PATH(LIBXML2_INCLUDE_DIR parser.h /usr/include/libxml2/ /usr/local/include/libxml2/)

FIND_LIBRARY(LIBXML2_LIBRARY NAMES LIBXML2 PATH /usr/lib /usr/local/lib) 

IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARY)
  SET(LIBXML2_FOUND TRUE)
ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARY)


IF (LIBXML2_FOUND)
  IF (NOT LIBXML2_FIND_QUIETLY)
    MESSAGE(STATUS "Found libLIBXML2: ${LIBXML2_LIBRARY}")
  ENDIF (NOT LIBXML2_FIND_QUIETLY)
ELSE (LIBXML2_FOUND)
  IF (LIBXML2_FIND_REQUIRED)
    MESSAGE(FATAL_ERROR "Could not find libLIBXML2")
  ENDIF (LIBXML2_FIND_REQUIRED)
ENDIF (LIBXML2_FOUND)
